<!--督导评教-->
<template>
  <div class="table-container">
    <tablelist :dataList="dataList" :colDataList="colDataList" :config="config"></tablelist>
  </div>
</template>

<script>

import tablelist from "@/views/comonents/tablelist";
import {supteamsta} from "@/api/teacher/supervision";
import {seleGroug} from "@/api/teacher/admin";
export default {
  components: {
    tablelist
  }, 
  data() {
    return {
      props: ["supqueryavg"],
      employeeid: '1',
      skjy: '张张',
      colDataList: [{
        label: '教员',
        prop: 'skjy',
        type: 'button'
      }, {
        label: '督导平均分',
        prop: 'ddpjf'
      }, {
        label: '日期',
        prop: 'skrq'
      }, {
        label: '听课节次',
        prop: 'tkjc'
      }, {
        label: '课程名称',
        prop: 'kcmc'
      }, {
        label: '教学班',
        prop: 'jxb'
      }, {
        label: '上课地点',
        prop: 'cd'
      },  {
        label: '评价分数',
        prop: 'pdfs'
      }, {
        label: '评价等级',
        prop: 'pjdj'
      }, {
        label: '督导专家',
        prop: 'tckr'
      }],
      config: {
        mergeTarget: 'employeeid', // 通用依据
        combineProp: [// combineProp - 根据mergeTarge 进行合并的单元格属性
         
          'skjy',
          'ddpjf'
        ]
      },
      dataList: [{
        employeeid: '12987121',
        jiaoyanshi: '教研室2',
        employee: '李教员*',
        job: '初职',
        avgscores: '90',
        schooltimeday: "2021-01-06",
        schooltimeweek: '星期一',
        listenclass: '1，2',
        classesname: '英语',
        classes: '教学班1',
        place: '校区',
        employeedep: '政府',
        evaluatescores: '96.36',
        orderofevaluation: 'A',
        supervisorid: '李教员',
      },

      ],

    };
  },
  mounted() {
     this.seleGroug();
     console.log(this.supqueryavg,"2222222222222222222222222222222222")
    // this.supteamsta(this.supqueryavg);
  },
  watch: {
    supqueryavg: {
      deep: true,
      handler(nv, ov) {
        this.dataList = nv
      }
    }
  },

  methods: {
     seleGroug(){
      let obj = {
           sqsjlx:"按教员统计",
           term : "2022春"
      }
       return new Promise(resolve => {
         seleGroug(obj).then((res) => { 
            this.dataList = res.data.data
           
            console.log(  this.dataList ,"aaaaaaaaaaaaaaaaaaaaa")
        })
      })
    },
    // supteamsta(obj) {
    //   console.log(obj, '22222222222222222222222222222222111111111111111111')
    //   return new Promise(() => {
    //     //教员查询到所有数据
        
    //     supteamsta(obj).then(res => {
    //       this.dataList = res.data.data;
    //       console.log(res.data.data, 'resssssssssssssssssssssssssssssssssss')
    //     })
    //   })
    // },
  },
};
</script>
<style lang="less" scoped>
.table-container {
  margin-top: 30px;

  .el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }

  .el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  .el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }

  .wrapper-button {
    display: flex;
    flex-direction: column;
    align-items: center;

    > div {
      margin-bottom: 8px;
    }
  }
}
</style>

<style lang="less" scoped>
@import "../../../styles/supervision.less";

.wrapper-container {
  width: 1711px;
  margin: 0 auto;
}

.table-container {
  margin-top: 30px;

  .table-data {
    width: 100%;
    border: 0.8px solid #004ca7;
    border-radius: 9px;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #004ca7;
  }
}
</style>
